<?php

namespace app\models;

use Yii;

/**
 * This is the model class for table "materialborrow".
 *
 * @property integer $id
 * @property string $stu_id
 * @property string $stu_name
 * @property string $activitytitle
 * @property string $material
 * @property string $telephone
 * @property string $time
 * @property string $approved
 * @property string $remark
 */
class MaterialborrowModel extends \yii\db\ActiveRecord
{
    /**
     * @inheritdoc
     */
    public static function tableName()
    {
        return 'materialborrow';
    }

    /**
     * @inheritdoc
     */
    public function rules()
    {
        return [
            [['stu_id', 'stu_name', 'activitytitle', 'material', 'telephone', 'time'], 'required'],
            [['stu_id'], 'string', 'max' => 20],
            [['stu_name', 'telephone', 'approved'], 'string', 'max' => 50],
            [['activitytitle', 'material', 'time', 'remark'], 'string', 'max' => 200],
        ];
    }

    /**
     * @inheritdoc
     */
    public function attributeLabels()
    {
        return [
            'id' => 'ID',
            'stu_id' => '学号',
            'stu_name' => '姓名',
            'activitytitle' => '活动主题',
            'material' => '申请物资',
            'telephone' => '联系电话',
            'time' => '使用时间',
            'approved' => '审批结果',
            'remark' => '备注',
        ];
    }
}
